<div class="cashMovements index">
    <h2><?php __('Cash Movements'); ?></h2>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th><?php echo $this->Paginator->sort('id'); ?></th>
            <th><?php echo $this->Paginator->sort('cash_id'); ?></th>
            <th><?php echo $this->Paginator->sort('user_id'); ?></th>
            <th><?php echo $this->Paginator->sort('type'); ?></th>
            <th><?php echo $this->Paginator->sort('amount'); ?></th>
            <th><?php echo $this->Paginator->sort('movement'); ?></th>
            <th><?php echo $this->Paginator->sort('description'); ?></th>
            <th><?php echo $this->Paginator->sort('job_id'); ?></th>
            <th><?php echo $this->Paginator->sort('employee_id'); ?></th>
            <th><?php echo $this->Paginator->sort('provider_id'); ?></th>
            <th><?php echo $this->Paginator->sort('expense_id'); ?></th>
            <th><?php echo $this->Paginator->sort('date_from'); ?></th>
            <th><?php echo $this->Paginator->sort('date_to'); ?></th>
            <th><?php echo $this->Paginator->sort('array_ids'); ?></th>
            <th><?php echo $this->Paginator->sort('modified'); ?></th>
            <th><?php echo $this->Paginator->sort('created'); ?></th>
            <th class="actions"><?php __('Actions'); ?></th>
        </tr>
        <?php
        $i = 0;
        foreach ($cashMovements as $cashMovement):
            $class = null;
            if ($i++ % 2 == 0) {
                $class = ' class="altrow"';
            }
            ?>
            <tr<?php echo $class; ?>>
                <td><?php echo $cashMovement['CashMovement']['id']; ?>&nbsp;</td>
                <td>
                    <?php echo $this->Html->link($cashMovement['Cash']['id'], array('controller' => 'cashes', 'action' => 'view', $cashMovement['Cash']['id'])); ?>
                </td>
                <td>
                    <?php echo $this->Html->link($cashMovement['User']['name'], array('controller' => 'users', 'action' => 'view', $cashMovement['User']['id'])); ?>
                </td>
                <td><?php echo $cashMovement['CashMovement']['type']; ?>&nbsp;</td>
                <td><?php echo $cashMovement['CashMovement']['amount']; ?>&nbsp;</td>
                <td><?php echo $cashMovement['CashMovement']['movement']; ?>&nbsp;</td>
                <td><?php echo $cashMovement['CashMovement']['description']; ?>&nbsp;</td>
                <td>
                    <?php echo $this->Html->link($cashMovement['Job']['id'], array('controller' => 'jobs', 'action' => 'view', $cashMovement['Job']['id'])); ?>
                </td>
                <td>
                    <?php echo $this->Html->link($cashMovement['Employee']['id'], array('controller' => 'employees', 'action' => 'view', $cashMovement['Employee']['id'])); ?>
                </td>
                <td>
                    <?php echo $this->Html->link($cashMovement['Provider']['name'], array('controller' => 'providers', 'action' => 'view', $cashMovement['Provider']['id'])); ?>
                </td>
                <td>
                    <?php echo $this->Html->link($cashMovement['Expense']['id'], array('controller' => 'expenses', 'action' => 'view', $cashMovement['Expense']['id'])); ?>
                </td>
                <td><?php echo $cashMovement['CashMovement']['date_from']; ?>&nbsp;</td>
                <td><?php echo $cashMovement['CashMovement']['date_to']; ?>&nbsp;</td>
                <td><?php echo $cashMovement['CashMovement']['array_ids']; ?>&nbsp;</td>
                <td><?php echo $cashMovement['CashMovement']['modified']; ?>&nbsp;</td>
                <td><?php echo $cashMovement['CashMovement']['created']; ?>&nbsp;</td>
                <td class="actions">
                    <?php echo $this->Html->link($this->Html->image('icons/magnifier.png'), array('action' => 'view', $cashMovement['CashMovement']['id']), array('title' => __('Ver', true), 'escape' => false)); ?>
                    <?php echo $this->Html->link($this->Html->image('icons/pencil.png'), array('action' => 'edit', $cashMovement['CashMovement']['id']), array('title' => __('Editar', true), 'escape' => false)); ?>
                    <?php echo $this->Html->link($this->Html->image('icons/cross.png'), array('action' => 'delete', $cashMovement['CashMovement']['id']), array('title' => __('Eliminar', true), 'escape' => false), sprintf(__('Are you sure you want to delete # %s?', true), $cashMovement['CashMovement']['id'])); ?>
                </td>
            </tr>
        <?php endforeach; ?>
    </table>
    <p>
        <?php
        echo $this->Paginator->counter(array(
            'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
        ));
        ?>	</p>

    <div class="paging">
        <?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class' => 'disabled')); ?>
        | 	<?php echo $this->Paginator->numbers(); ?>
        |
        <?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled')); ?>
    </div>
</div>
<div class="actions">
    <h3><?php __('Actions'); ?></h3>
    <ul>
        <li><?php echo $this->Html->link(__('New Cash Movement', true), array('action' => 'add')); ?></li>
        <li><?php echo $this->Html->link(__('List Cashes', true), array('controller' => 'cashes', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Cash', true), array('controller' => 'cashes', 'action' => 'add')); ?> </li>
        <li><?php echo $this->Html->link(__('List Users', true), array('controller' => 'users', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New User', true), array('controller' => 'users', 'action' => 'add')); ?> </li>
        <li><?php echo $this->Html->link(__('List Jobs', true), array('controller' => 'jobs', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Job', true), array('controller' => 'jobs', 'action' => 'add')); ?> </li>
        <li><?php echo $this->Html->link(__('List Employees', true), array('controller' => 'employees', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Employee', true), array('controller' => 'employees', 'action' => 'add')); ?> </li>
        <li><?php echo $this->Html->link(__('List Providers', true), array('controller' => 'providers', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Provider', true), array('controller' => 'providers', 'action' => 'add')); ?> </li>
        <li><?php echo $this->Html->link(__('List Expenses', true), array('controller' => 'expenses', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Expense', true), array('controller' => 'expenses', 'action' => 'add')); ?> </li>
    </ul>
</div>